//
//  FFCommonDefines.h
//  FFMovieFoundation
//
//  Created by xbmac on 5/8/14.
//  Copyright (c) 2014 xb. All rights reserved.
//

#ifndef FFMOVIEFOUDATION_FFCOMMON_DEFINES_H
#define FFMOVIEFOUDATION_FFCOMMON_DEFINES_H

#include <sys/types.h>

#define FF_TIME_SCALE  1000000

/**
 * Define the video fill mode support by FFMediaPlayer playback view.
 */
typedef enum emFFVideoScalingMode {
    FFVideoScalingModeNone,       // No scaling
    FFVideoScalingModeAspectFit,  // Uniform scale until one dimension fits
    FFVideoScalingModeAspectFill, // Uniform scale until the movie fills the visible bounds. One dimension may have clipped contents
    FFVideoScalingModeFill        // Non-uniform scale. Both render dimensions will exactly match the visible bounds
} emFFVideoScalingMode;

typedef struct FFMediaStream {
  void *opque;
  
  // 0X7FFFFFFF 表示文件末尾
  int (*read)(void *opque, uint8_t *buff, int buff_size);
  
  // MPSEEK_SIZE 获取文件大小
  int64_t (*seek)(void *opque, int64_t pos, int whence);
}FFMediaStream;

#endif
